<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
  <title>The source code</title>
    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
</head>
<body  onload="prettyPrint();">
    <pre class="prettyprint lang-js">Ext.ns("Game.tiny");

<div id="cls-Game.tiny.Tetris_Simple"></div>/**
 * 图形类型类 总类
 * @class Game.tiny.Tetris_Simple
 * @extends Ext.util.Observable
 */
Game.tiny.Tetris_Simple = Ext.extend(Ext.util.Observable,{
  <div id="method-Game.tiny.Tetris_Simple-constructor"></div>/**
   * 构造函数
   * @constructor 
   * @param {object} data
   */
  constructor:function(data){
    Game.tiny.Tetris_Simple.superclass.constructor.apply(this, arguments);  
    this._data = data;
    this._pos = 0;
  },
  <div id="method-Game.tiny.Tetris_Simple-rotate"></div>/**
   * 旋转图形
   * @method rotate
   */
  rotate:function(){
    if(this._pos == this._data.length){
      this._pos = 0;
    }else{
      this._pos ++;
    }
  },
  <div id="method-Game.tiny.Tetris_Simple-getData"></div>/**
   * 获取当前数据
   * @method getData
   */
  getData:function(){
    return this._data[this._pos];
  }
});
 </pre>    
</body>
</html>